#ifndef CALLBACKS_H
#define CALLBACKS_H

void app_on_reg_started2(pjsua_acc_id acc_id, pjsua_reg_info *info);

void app_on_reg_state2(pjsua_acc_id acc_id, pjsua_reg_info *info);

void app_on_call_state(pjsua_call_id call_id, pjsip_event *e);

void app_on_call_tsx_state(pjsua_call_id call_id,
                              pjsip_transaction *tsx,
                              pjsip_event *e);

void app_on_dtmf_digit(pjsua_call_id call_id, int digit);                              

void app_on_call_media_state(pjsua_call_id call_id);

void app_on_call_media_event(pjsua_call_id call_id,
                                unsigned med_idx,
                                pjmedia_event *event);

void app_on_nat_detect(const pj_stun_nat_detect_result *res);

void app_on_call_transfer_request2(pjsua_call_id call_id,
                                    const pj_str_t *dst,
                                    pjsip_status_code *code,
                                    pjsua_call_setting *opt);

void app_on_call_transfer_status(pjsua_call_id call_id,
                                int st_code,
                                const pj_str_t *st_text,
                                pj_bool_t final,
                                pj_bool_t *p_cont);

void app_on_ip_change_progress(pjsua_ip_change_op op,
                                  pj_status_t status,
                                  const pjsua_ip_change_op_info *info);

pjsip_redirect_op app_on_call_redirected(pjsua_call_id call_id, 
                                        const pjsip_uri *target,
                                        const pjsip_event *e);

void app_on_incoming_call(pjsua_acc_id acc_id, pjsua_call_id call_id,
                             pjsip_rx_data *rdata);

void app_on_buddy_state(pjsua_buddy_id buddy_id);

void app_on_pager2(pjsua_call_id call_id, const pj_str_t *from,
                      const pj_str_t *to, const pj_str_t *contact,
                      const pj_str_t *mime_type, const pj_str_t *body,
                      pjsip_rx_data *rdata, pjsua_acc_id acc_id);

void app_on_pager_status2(pjsua_call_id call_id,
                            const pj_str_t *to,
                            const pj_str_t *body,
                            void *user_data,
                            pjsip_status_code status,
                            const pj_str_t *reason,
                            pjsip_tx_data *tdata,
                            pjsip_rx_data *rdata,
                            pjsua_acc_id acc_id);                      

void app_on_call_replace_request2(pjsua_call_id call_id,
                                     pjsip_rx_data *rdata,
                                     int *st_code,
                                     pj_str_t *st_text,
                                     pjsua_call_setting *opt);

void app_on_call_replaced(pjsua_call_id old_call_id,
                             pjsua_call_id new_call_id);

void app_on_mwi_info(pjsua_acc_id acc_id, pjsua_mwi_info *mwi_info);
#endif

